#!/usr/bin/env python
from lib.HandleMysql import *
from lib.switch_code import *
import sys
import re
reload(sys)
sys.setdefaultencoding('utf-8')


#mysql - product
def set_product_conn():    
    conn = HandleMysql('ecmproduct0-s.db.58dns.org','58885','emcproduct_hprro','OqX1jJ3Qjy','dbwww58com_emcproduct_0')
    conn.connect()
    return conn

#mysql - order
def set_order_conn():    
    conn = HandleMysql('emcorder-s.db.58dns.org','58885','emcorder_hprro','Yb%LEfmLO5','dbwww58com_emcorder')
    conn.connect()
    return conn

#mysql - shop
def set_shop_conn():    
    conn = HandleMysql('shopemc-s.db.58dns.org','58885','shopuser_fenxi','mYmq6U.^~V','dbwww58com_shopemc')
    #conn = HandleMysql('192.168.120.36','3306','root','root','dbwww58com_shopemc')
    conn.connect()
    return conn

#mysql - stats
def set_stats_conn():    
    conn = HandleMysql('10.5.20.16','58885','ec_stat','L#c8UM5RGh5C','dbwww58com_shop_stats')
    conn.connect()
    return conn
